package com.ease.framework {

import mx.core.IMXMLObject;

public class CommandSet implements IMXMLObject
{
   /**
    * The CommandRegistry that the commands in this set are to be registered with.
    */
   public var registry:CommandRegistry = CommandRegistry.instance;

   /**
    * The collection of CommandMapping instances that are part of this command set.
    */
   [ArrayElementType("com.ease.framework.CommandMapping")]
   public var mappings:Array;

   /**
    * The collection of command classes that are part of this command set.
    */
   [ArrayElementType("Class")]
   public var commands:Array;

   /**
    * Called after the implementing object has been created and all component properties
    * specified on the MXML tag have been initialized.
    *
    * @param document
    *  The MXML document that created this object.
    * @param id
    *  The identifier used by document to refer to this object.
    *
    * @internal The @inheritDoc tag doesn't work here or else that'd be used rather than
    * copy-pasting the doc from the interface.
    */
   public function initialized( document:Object, id:String ):void {
      registry.addCommandSet( this );
   }
} // class

}